/*
 * @Date: 2024-04-23 15:02:29
 * @LastEditors: lyx
 * @LastEditTime: 2024-04-23 15:13:42
 * @FilePath: \taro-template3\src\packageA\components\ChatSuggested\index.tsx
 * @Description:
 */
import React, { useEffect } from "react";
import "./index.less";

interface IProps {
  chatInfo: {
    msgId: string;
    dataId: string;
  };
  onCon: (str: string) => void;
  quesList: string[];
}
const markdownStringSuggested = `我们未找到您提问的相关数据，请明确您咨询的具体目标，以下是您可以参考的问题：`;

const ChatSuggested: React.FC<IProps> = ({ chatInfo, quesList, onCon }) => {
  const idStr = `chat-suggested-component-${chatInfo.msgId}-${chatInfo.dataId}`;
  // Component State
  // Component Event
  // Component Effect
  useEffect(() => {}, []);
  return (
    <div id={idStr} className={`chat-suggested-component`}>
      <div>{markdownStringSuggested}</div>
      {quesList.map((item: string, index: number) => {
        return (
          <div
            className="suggested-item"
            key={index}
            onClick={() => {
              onCon(item);
            }}
          >
            {item}
          </div>
        );
      })}
    </div>
  );
};

export default ChatSuggested;
